define(["jquery", "easy-admin"], function ($, ea) {

    var init = {
        table_elem: '#currentTable',
        table_render_id: 'currentTableRenderId',
        index_url: 'integral.sign_config/index',
        add_url: 'integral.sign_config/add',
        edit_url: 'integral.sign_config/edit',
        delete_url: 'integral.sign_config/delete',
        export_url: 'integral.sign_config/export',
        modify_url: 'integral.sign_config/modify',
    };

    var Controller = {

        index: function () {
            ea.table.render({
                init: init,
                cols: [[
                    {width: 30,type: 'checkbox'},
                    {width: 100,field: 'id', title: 'id'},
                    {width: 100,field: 'first_day', title: '第一天 签到获得积分'},
                    {width: 100,field: 'second_day', title: '第二天  签到获得积分'},
                    {width: 100,field: 'third_day', title: '第三天  签到获得积分'},
                    {width: 100,field: 'fourth_day', title: '第四天  签到获得积分'},
                    {width: 100,field: 'fifth_day', title: '第五天 签到获得积分'},
                    {width: 100,field: 'sixth_day', title: '第六天 签到获得积分'},
                    {width: 100,field: 'seventh_day', title: '第七天'},
                    {width: 100,field: 'status', search: 'select', selectList: ["启用","禁用"], title: '状态', templet: ea.table.switch},
                    {width: 100,field: 'create_time', title: '创建时间'},
                    {width: 250, title: '操作', templet: ea.table.tool},
                ]],
            });

            ea.listen();
        },
        add: function () {
            ea.listen();
        },
        edit: function () {
            ea.listen();
        },
    };
    return Controller;
});